typedef int ElementType;
class InvalidIndexException{};

class Array2d
{

public:
Array2d(int rows, int cols);
Array2d(Array2d& a);
~Array2d();
int getNumRows() { return numRows; }
int getNumCols() { return numCols; }
ElementType& elementAt (int r, int c);



private:
int numRows;
int numCols;
ElementType** arr;
};